/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DATA;

import input.ExcelTools;

import java.io.File;
import java.util.Vector;

import DATA.iDataSetParts.IdInfo;
import DATA.iDataSetParts.Measurement;

/**
 * 
 * @author Bunkowski
 */
public class BbImsSet {
	public Vector<Measurement> measurements = new Vector<Measurement>();
	public Vector<IdInfo> infos = new Vector<IdInfo>();
	public String name;

	public BbImsSet(File f) {
		name = f.getName().replace("IMSSet", "");
		Vector<String[]> fileContent = ExcelTools.importXLS(f, 0);
		for (int i = 1; i < fileContent.size(); i++) { // skipping header
			String[] line = fileContent.get(i);
			String path = line[1] + "\\" + line[0];
			File temp = new File(path);
			if (temp.exists()) {
				measurements.add(new Measurement(path));
			}
			if (!line[3].trim().equals("")) {
				Vector<String> elements = new Vector<String>();
				// for (String element : line[3].split(";")){
				// elements.add(element);
				// }
				elements.add(line[3].trim());
				infos.add(new IdInfo(line[0].split("_")[1], elements));
			}
		}
	}

}
